package com.maslyk.invitation.exception;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

import org.apache.log4j.Logger;

public class JSFExceptionHandler
{
	Logger log = Logger.getLogger(JSFExceptionHandler.class);
	
	public void handleException(FacesContext fc, Exception ex)
	{
        log.error(ex,ex);
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, ex.getMessage(), ex.getMessage()));
	}
}
